package application.controller
{
	import application.model.ConfigProxy;
	import application.model.GatewayProxy;
	
	import org.puremvc.interfaces.ICommand;
	import org.puremvc.interfaces.INotification;
	import org.puremvc.patterns.command.SimpleCommand;
	
	public class SetupModelCommand extends SimpleCommand implements ICommand
	{
		override public function execute(notification:INotification):void
		{
			var config:ConfigProxy = facade.retrieveProxy( ConfigProxy.NAME ) as ConfigProxy;
			
			var gatewayURI:String = config.getData().gateway;
			
			facade.registerProxy( new GatewayProxy(gatewayURI) );
		}
	}
}